package com.onpositive.notes.argumnets;

import com.onpositive.notes.label.providers.BasicLabelProvider;
import com.onpositive.notes.model.ITemplateModel;
import com.onpositive.units.ParsedDimension;

public class DimensionArgumnetModel extends BasicArgumentModel<ParsedDimension, DimensionArgument> {

	public DimensionArgumnetModel() {
		super();
	}

	private static final long serialVersionUID = 1626877376660579924L;

	public DimensionArgumnetModel(String name, boolean isRequired) {
		super(ParsedDimension.class, name, new BasicLabelProvider<ParsedDimension>(ParsedDimension.class), isRequired);
	}

	@Override
	public DimensionArgument createInstance(ParsedDimension value, ITemplateModel<?> templateModel) {
		DimensionArgument arg = new DimensionArgument(value, this, isRequired);
		arg.setTemplateModelId( templateModel.getId() ) ;
		return arg ;
	}

}
